import HotClass from "shared/component/hotconfig/HotClass";


export default class CatchControlller extends HotClass implements Ctn.move.CatchControlller {
    catchByTrail(characterEntity: Ctn.character.CharacterEntity, target: Ctn.move.CatchControlllerTarget): void {
        const force = characterEntity.character?.Trail.CatchController
        if (force?.IsA('AlignPosition')) {
            force.Mode = Enum.PositionAlignmentMode.TwoAttachment;
            force.ReactionForceEnabled = true;
            force.Enabled = true;
            force.RigidityEnabled = true;
            force.Attachment0 = target.att;
            force.Attachment1 = characterEntity.character?.Trail.TrailRigAttachment;
        }

    }

}